package com.mrx.xcitools.constant;

import java.io.File;
import java.util.Objects;

/**
 * @author Mr.X
 * @since 2024-03-11 14:51
 **/
public class FileConstant {

    public static final File DATA_DIR = new File(System.getProperty("X.dataDir", "./data"));

    public static final File JARS_DIR = new File(DATA_DIR, "jars");

    public static final File JAR_DATA_DIR = new File(JARS_DIR, "data");

    public static final File BASE_REPO_FILE = new File(FileConstant.DATA_DIR, "./repos/");

    public static final String PRIVATE_KEY = Objects.requireNonNull(new File(System.getProperty("user.home") + "/.ssh")
            .listFiles((file, name) -> name.endsWith(".pub")))[0]
            .getAbsolutePath().replace(".pub", "");

    public static final String OUT_PUT_LOG = "output.log";

    public static final String ERROR_LOG = "error.log";

}
